package game.players.states;

import com.uqbar.vainilla.DeltaState;

import game.ball.SoccerBall;
import game.players.SoccerPlayer;

public abstract class IdlePlayer extends WithoutBall {

	public IdlePlayer(SoccerPlayer player) {
		super(player);
	}

	@Override
	public void takePossession(SoccerBall ball) {}

	@Override
	public boolean collidesAgainstBall(SoccerBall ball, SoccerPlayer player) {
		return false;
	}
	
	@Override
	public void update(DeltaState deltaState) {
		if (this.getPlayer().getScene().isBallOnGame())
			this.changeState();
	}

	protected abstract void changeState();

}
